<template>
  <div class="group">
    <basic-container>
      <avue-tabs :option="option" @change="handleChange"></avue-tabs>
      <autoWarning v-if="type.prop === 'warning'"></autoWarning>
      <groupAnalysis v-else-if="type.prop === 'analysis'"></groupAnalysis>
    </basic-container>
  </div>
</template>

<script>
import autoWarning from "./group/autoWarning.vue";
import groupAnalysis from "./group/groupAnalysis.vue";

export default {
  name: "roup",
  components: { autoWarning, groupAnalysis },
  data() {
    return {
      type: {},
      option: {
        column: [
          {
            icon: "el-icon-warning",
            label: "自动预警团体报告",
            prop: "warning"
          },
          {
            icon: "el-icon-question",
            label: "团体报告分析",
            prop: "analysis"
          }
        ]
      }
    };
  },
  created() {
    this.type = this.option.column[0];
  },
  methods: {
    handleChange(column) {
      this.type = column;
    }
  }
};
</script>

<style lang="scss" scoped>
.group {
}
</style>
